Skip to content

Conversation

brianschubert
Copy link
Member

@brianschubert brianschubert commented Aug 25, 2025

Fixes #19734

Make semanal defer for placeholders in the upper bounds / constraints, even when the type variable doesn't appear in the target.

https://discuss.python.org/t/mypy-raises-exception-for-certain-type-alias-definitions-with-parameters-bounded-by-a-not-yet-defined-type/103305

Copy link
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

Copy link
Member

@ilevkivskyi ilevkivskyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG! This is one of the places where the new syntax needs extra care.

@ilevkivskyi ilevkivskyi merged commit 4847ec8 into python:master Aug 29, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash for certain type alias definitions with parameter with parameter bounded by a forward type
2 participants